<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      > 

<h:head></h:head> 
<h:body>
<h:form id="form">
	<p:panel header="AutoComplete" toggleable="true" id="panel">
		<h:panelGrid columns="2" cellpadding="5">
					
			<h:outputLabel value="Simple :" for="acSimple" />
			<p:autoComplete id="acSimple2" value="#{autocom.txt1}" 
					completeMethod="#{autocom.autoCompletado}"/>
		</h:panelGrid>						  			
	</p:panel>
	
	<p:commandButton value="Submit" id="submit" update="display" oncomplete="dialog.show()" />
	
	<p:commandButton actionListener="#{autocom.captura}" value="Imprimir" />
	
	
	
	<p:dialog header="Values" widgetVar="dialog"
			showEffect="fold" hideEffect="fold" width="200">
			
         <h:panelGrid id="display" columns="2" cellpadding="5">
			<h:outputText value="Value 1: " />
			<h:outputText value="#{autocom.txt1}" />			
		</h:panelGrid>
		
	</p:dialog>
             	
</h:form>
				
</h:body>
</html>
